package cn.luischen.interceptor;

<<<<<<< HEAD
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import cn.luischen.utils.IPKit;
import cn.luischen.service.user.UserService;
import cn.luischen.utils.MapCache;
import org.springframework.web.servlet.ModelAndView;
import cn.luischen.model.UserDomain;
import cn.luischen.constant.Types;
import cn.luischen.service.option.OptionService;
import javax.servlet.http.HttpServletRequest;
import org.springframework.web.servlet.HandlerInterceptor;
import cn.luischen.utils.Commons;
import cn.luischen.utils.TaleUtils;
import org.slf4j.Logger;
import javax.servlet.http.HttpServletResponse;
import org.springframework.stereotype.Component;
import cn.luischen.utils.AdminCommons;
import cn.luischen.utils.UUID;
import cn.luischen.model.OptionsDomain;
import cn.luischen.constant.WebConst;

import static org.junit.Assert.fail;
import org.mockito.MockitoAnnotations;
import java.util.Map;
import org.junit.After;
import java.lang.reflect.Method;
import static org.junit.Assert.*;
import java.util.List;
import com.alibaba.fastjson.TypeReference;
import static org.junit.Assert.assertNotNull;
import static org.mockito.ArgumentMatchers.*;
import static org.mockito.Mockito.*;
import org.powermock.reflect.Whitebox;
import org.mockito.Mock;
import org.junit.runner.RunWith;
import java.util.HashMap;
import java.util.ArrayList;
import com.alibaba.fastjson.JSONArray;
import org.powermock.core.classloader.annotations.PrepareForTest;
import static org.junit.Assert.assertEquals;
import org.powermock.modules.junit4.PowerMockRunner;
import org.powermock.api.mockito.PowerMockito;
import org.powermock.core.classloader.annotations.PowerMockIgnore;
import org.junit.rules.ExpectedException;
import org.mockito.InjectMocks;
import org.junit.Test;
import com.unitspirit.runtime.*;
import org.mockito.Mockito;
import com.alibaba.fastjson.JSON;
import org.junit.Rule;
import static org.junit.Assert.assertTrue;
import com.alibaba.fastjson.parser.ParserConfig;

/**
* The class <code>BaseInterceptorTest</code> contains tests for the class <code>{@link BaseInterceptor}</code>.
* Copyright (c) 2020
* 
* @generatedBy UnitSpirit at 2021-09-07 17:51:46
* @version 1.0.20210903
*/

@PowerMockIgnore({ "javax.management.*" })
public class BaseInterceptor_initSiteConfig_WGTest {

	@InjectMocks
	cn.luischen.interceptor.BaseInterceptor unitspirit_fixture;
	@Mock
	cn.luischen.service.user.UserService mock_UserService;
	@Mock
	cn.luischen.utils.AdminCommons mock_AdminCommons;
	@Mock
	cn.luischen.service.option.OptionService mock_OptionService;
	@Mock
	cn.luischen.utils.Commons mock_Commons;

=======
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.web.servlet.HandlerInterceptor;
import org.springframework.web.servlet.ModelAndView;
import cn.luischen.constant.Types;
import cn.luischen.constant.WebConst;
import cn.luischen.model.OptionsDomain;
import cn.luischen.model.UserDomain;
import cn.luischen.service.option.OptionService;
import cn.luischen.service.user.UserService;
import cn.luischen.utils.AdminCommons;
import cn.luischen.utils.Commons;
import cn.luischen.utils.IPKit;
import cn.luischen.utils.MapCache;
import cn.luischen.utils.TaleUtils;
import cn.luischen.utils.UUID;

import static org.junit.Assert.*;
import static org.mockito.ArgumentMatchers.*;
import static org.mockito.Mockito.*;
import org.junit.Rule;
import org.junit.runner.RunWith;
import org.junit.rules.ExpectedException;
import org.junit.Test;
import org.powermock.api.mockito.PowerMockito;
import org.powermock.core.classloader.annotations.PrepareForTest;
import org.powermock.core.classloader.annotations.PowerMockIgnore;
import org.powermock.modules.junit4.PowerMockRunner;
import org.powermock.reflect.Whitebox;
import org.mockito.InjectMocks;
import org.mockito.Mock;
import org.mockito.Mockito;
import org.mockito.MockitoAnnotations;
import org.mockito.stubbing.Answer;
import java.lang.reflect.Method;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.TypeReference;
import com.alibaba.fastjson.parser.ParserConfig;
import java.util.Map;
import java.util.List;
import com.unitspirit.runtime.*;

/**
 * The class contains tests for the class cn.luischen.interceptor.BaseInterceptor.
 *
 * @generatedBy UnitSpirit CreateTemplateTestFile4
 * @version 1.0.9.11 
 */
@PowerMockIgnore({ "javax.management.*" })
public class BaseInterceptor_initSiteConfig_WGTest {
>>>>>>> 3b028d6f1d2dd25e613c470e379df4ff28f4935e
	@Rule
	public ExpectedException unitspirit_thrown = ExpectedException.none();

	/**
<<<<<<< HEAD
	* 测试方法初始化.
	* 
	* @throws Exception 
	*         if the initialization fails for some reason 
	*  
	* @generatedBy UnitSpirit at 2021-09-07 17:51:46
	*/
=======
	 * 测试方法初始化.
	 * 
	 * @throws Exception 
	 *         if the initialization fails for some reason 
	 *  
	 * @generatedBy UnitSpirit at 2021-12-06 21:50:26
	 */
>>>>>>> 3b028d6f1d2dd25e613c470e379df4ff28f4935e
	@org.junit.Before
	public void setUp() throws Exception {
		try {
			GlobalUnitInit.init();
			MockitoAnnotations.initMocks(this);
			ParserConfig.getGlobalInstance().setAutoTypeSupport(true);
		} catch (Exception ex) {
			ex.printStackTrace();
		}
	}

<<<<<<< HEAD
	/**
	* @date 2021-09-07 17:51:48
	* @see cn.luischen.interceptor.BaseInterceptor#initSiteConfig
	* @category auto generate by UnitSpirit  
	* @author UnitSpirit   
	*/
	@Test
	public void test_initSiteConfig_0113_190011_510_1_0() throws Throwable {
		javax.servlet.http.HttpServletRequest HttpServletRequest_p_0 = Mockito
				.mock(javax.servlet.http.HttpServletRequest.class);
		//成员变量设置

		//返回值定义 
		//该函数无返回值 

		Whitebox.invokeMethod(unitspirit_fixture, "initSiteConfig", HttpServletRequest_p_0);
		assertTrue(true);
	}

	/**
	* @date 2021-09-07 17:51:48
	* @see cn.luischen.interceptor.BaseInterceptor#initSiteConfig
	* @category auto generate by UnitSpirit  
	* @author UnitSpirit   
	*/
	@Test
	public void test_initSiteConfig_0113_190011_510_4_0() throws Throwable {
		javax.servlet.http.HttpServletRequest HttpServletRequest_p_0 = Mockito
				.mock(javax.servlet.http.HttpServletRequest.class);
		//成员变量设置

		//返回值定义 
		//该函数无返回值 

		Whitebox.invokeMethod(unitspirit_fixture, "initSiteConfig", HttpServletRequest_p_0);
		assertTrue(true);
	}

	/**
	* @date 2021-09-07 17:51:48
	* @see cn.luischen.interceptor.BaseInterceptor#initSiteConfig
	* @category auto generate by UnitSpirit  
	* @author UnitSpirit   
	*/
	@Test
	public void test_initSiteConfig_20210722_100103_690_1_0() throws Throwable {
		javax.servlet.http.HttpServletRequest HttpServletRequest_p_0 = Mockito
				.mock(javax.servlet.http.HttpServletRequest.class);
		//成员变量设置

		//返回值定义 
		//该函数无返回值 

		java.util.ArrayList<cn.luischen.model.OptionsDomain> mock_result_ArrayList14 = JSON.parseObject(
				"[{\"name\":\"baidu_site_verification\",\"description\":\"百度网站验证码\",\"value\":\"123\"},{\"name\":\"google_site_verification\",\"description\":\"google网站验证码\",\"value\":\"111\"},{\"name\":\"site_description\",\"description\":\"网站描述\",\"value\":\"erer\"},{\"name\":\"site_keywords\"},{\"name\":\"site_record\",\"description\":\"备案号\",\"value\":\"222\"},{\"name\":\"site_title\",\"description\":\"网站标题\",\"value\":\"11122211\"},{\"name\":\"social_csdn\",\"description\":\"csdn\",\"value\":\"111\"},{\"name\":\"social_github\",\"description\":\"github\",\"value\":\"\"},{\"name\":\"social_jianshu\",\"description\":\"简书地址\",\"value\":\"123\"},{\"name\":\"social_resume\",\"description\":\"简历地址\",\"value\":\"\"},{\"name\":\"social_twitter\",\"description\":\"twitter\",\"value\":\"\"},{\"name\":\"social_weibo\",\"description\":\"微博地址\",\"value\":\"333\"},{\"name\":\"social_zhihu\",\"description\":\"知乎地址\",\"value\":\"\"}]",
				new com.alibaba.fastjson.TypeReference<java.util.ArrayList<cn.luischen.model.OptionsDomain>>() {
				});

		PowerMockito.when(mock_OptionService.getOptions()).thenReturn(mock_result_ArrayList14);

		Whitebox.invokeMethod(unitspirit_fixture, "initSiteConfig", HttpServletRequest_p_0);
		assertTrue(true);
	}

	/**
	* @date 2021-09-07 17:51:48
	* @see cn.luischen.interceptor.BaseInterceptor#initSiteConfig
	* @category auto generate by UnitSpirit  
	* @author UnitSpirit   
	*/
	@Test
	public void test_initSiteConfig_20210722_100104_095_1_0() throws Throwable {
=======
	@InjectMocks
	cn.luischen.interceptor.BaseInterceptor unitspirit_fixture;

	@Mock
	cn.luischen.service.user.UserService mock_UserService;
	@Mock
	cn.luischen.utils.AdminCommons mock_AdminCommons;
	@Mock
	cn.luischen.service.option.OptionService mock_OptionService;
	@Mock
	cn.luischen.utils.Commons mock_Commons;

	/**
	 * @date 2021-12-06 21:50:27
	 * @see cn.luischen.interceptor.BaseInterceptor#initSiteConfig
	 * @category auto generate by UnitSpirit  
	 */
	@Test
	public void test_initSiteConfig_20211109_110225_124_1_0() throws Throwable {
>>>>>>> 3b028d6f1d2dd25e613c470e379df4ff28f4935e
		javax.servlet.http.HttpServletRequest HttpServletRequest_p_0 = Mockito
				.mock(javax.servlet.http.HttpServletRequest.class);
		//成员变量设置

		//返回值定义 
		//该函数无返回值 

<<<<<<< HEAD
		Whitebox.invokeMethod(unitspirit_fixture, "initSiteConfig", HttpServletRequest_p_0);
=======
		Whitebox.invokeMethod(unitspirit_fixture, "initSiteConfig",
				HttpServletRequest_p_0);
>>>>>>> 3b028d6f1d2dd25e613c470e379df4ff28f4935e
		assertTrue(true);
	}
}
